package com.idol.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.idol.service.IArticleService;
import com.idol.dao.ArticleMapper;
import com.idol.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Supreme_Sir
 * @version 1.0
 * @className ArticleService
 * @description
 * @date 2020/11/8 21:00
 **/
@Service
public class ArticleService implements IArticleService {
    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public PageInfo<Article> selectByPage(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(articleMapper.selectAll());
    }
}
